import React, { Component } from 'react';
import {Link,withRouter} from 'react-router-dom'

@withRouter
class Mylink extends Component {
    render() {
        console.log(this.props.match)
        let props={...this.props,to:this.props.match.path+this.props.to}
        return (
        <>
           <Link {...props}>{this.props.children}@</Link>
        </>
        );
    }
}

export default Mylink;
